import { onMounted , onUnmounted ,nextTick  } from 'vue'
import { useStore } from 'vuex'


const uesLoginModel = () => {
    const store = useStore()
    
    const bindLogin = ()=> {
        console.log(store.state.isLogin)
    }
    onMounted(()=> {
        const doms = document.querySelectorAll('.isLogin');
        nextTick(():void => {
            doms.forEach(dom => {
                dom.addEventListener('click',bindLogin)
            })
        })
    })

    onUnmounted(() => {
        console.log(123)
    })

 
}

export default uesLoginModel